if (localStorage.getItem('is')) {
    location.assign("../首页/首页.html")
}
function dl() {
    var dl = document.querySelectorAll('input')[0].value
    var mm = document.querySelectorAll('input')[1].value
    var d = localStorage.getItem('name')
    var m = localStorage.getItem('pass')
    if (dl == d && mm == m) {
        var check = document.querySelectorAll('input')[2]
        if (check.checked) {
            localStorage.setItem('is', true)
            location.assign("../首页/首页.html")
        } else {
            localStorage.removeItem('is')
            location.assign("../首页/首页.html")
        }

    } else if (dl == '' && mm == '') {
        alert('用户名和密码不能为空')
    } else {
        alert("用户名或密码输入错误")
    }

}